# Maintainer: Jelle van der Waa <jelle@archlinux.org>
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>

pkgname=python-flask-talisman
_pyname=${pkgname/python-/}
pkgver=1.1.0
pkgrel=1
pkgdesc='HTTP security headers for Flask'
url='https://github.com/wntrblm/flask-talisman'
arch=('any')
license=('APACHE')
depends=('python-flask' 'python-six')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=(https://github.com/wntrblm/flask-talisman/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha256sums=('02829a008f7127166d66f3731a57e5cd0bcbb6182e7b8fea30a6cb115d3726a4')

build() {
  cd ${_pyname}-${pkgver}
  python setup.py build
}

check() {
  cd ${_pyname}-${pkgver}
  pytest flask_talisman
}

package() {
  cd ${_pyname}-${pkgver}
  python setup.py install --root="${pkgdir}" -O1 --skip-build
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -Dm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et:
